/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package csse3004.GD.PC;

import csse3004.GD.DA.PollCreatorDA;
import javax.servlet.ServletException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.SimpleFormController;
import org.springframework.web.servlet.view.RedirectView;

/**
 *
 * @author Lewis Kelly 42007689
 */

public class specialMCQController extends SimpleFormController {
    protected final Log logger = LogFactory.getLog(getClass());
    
    @Override
    public ModelAndView onSubmit(Object command) throws ServletException {        
        specialMCQ sp = (specialMCQ) command;
        int id = sp.getPollID();
        logger.info("I've Got: "+id+" for id");
        ModelAndView mnv = new ModelAndView("specialMCQ", "pid", id);
        logger.info("returning newMCQ page");
        return mnv;
    }
}
